package pers.course.week1;

import java.util.Scanner;

public class Pi {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int num = s.nextInt();
        double result = 0, k = 1;
        for(double i = 1; i < num + 1; i = i + 2.0)
        {
            result = k / i + result;
            k = k * (-1.0);
        }
        result = 4.0 * result;
        System.out.printf("%.6f%n", result);
        s.close();
    }
}
